Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions for Editing Movies / Adding Samples to Media Structures


BeginMediaEdits

The BeginMediaEdits function starts a media-editing session.

pascal OSErr BeginMediaEdits (Media theMedia);
theMedia
Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as NewTrackMedia and GetTrackMedia (described on page 2-138 and page 2-190, respectively).
DESCRIPTION
You use the BeginMediaEdits function to notify the Movie Toolbox that you are going to add sample data to a media. In response, the Movie Toolbox determines whether the media can be updated. For example, if the media data are stored on disk, the Movie Toolbox opens the disk file with write permissions. If the media is stored on a read-only storage medium, such as a CD-ROM disc, the Movie Toolbox does not start an editing session and returns an error.

Use the EndMediaEdits function, which is described in the next section, to end a media-editing session.

You must call BeginMediaEdits before you add samples to a media with the AddMediaSample function (described on page 2-256). Under some circumstances, you must start a media-editing session before calling the InsertTrackSegment function (described on page 2-246).

ERROR CODES
invalidMedia-2008This media is corrupted or invalid
File system errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996